package com.amado.easyui2.dao;

import java.util.List;

import com.amado.easyui2.domain.Department;
import com.amado.easyui2.vo.Page;

public interface DepartmentDao {
	/**
	 * 添加部门
	 * 
	 * @param department
	 * @return
	 */
	public int add(Department department);

	/**
	 * 删除部门
	 * 
	 * @param id
	 * @return
	 */
	public int delete(Long id);

	/**
	 * 修改部门
	 * 
	 * @param department
	 * @return
	 */
	public int update(Department department);

	/**
	 * 查询所有部门
	 * 
	 * @return
	 */
	List<Department> listAll();
	
	/**
	 * 查询所有部门
	 * 
	 * @return
	 */
	default  Department getById(Long id) {
		return null;
	}

	/**
	 * 分页查询部门
	 * 
	 * @param page
	 * @return
	 */
	public List<Department> listAll(Page page);

	/**
	 * 查询部门数量
	 * 
	 * @return
	 */
	public int listAllCount();
	
	Department getByDeptName(String departmentName);
	
	default Department getByDeptNumber(String deptNumber) {
		return null;
	}

}
